<extend name="zh_tw:Public:base" />
<block name="title">
    <title>美住 - 同步中心</title>
</block>
<block name="extendHead">
    <link rel="stylesheet" type="text/css" href="/Public/dist/Home/common_control.css?rev=65393a524028c7e3b76e961a08059c71d">
    <link rel="stylesheet" type="text/css" href="/Public/dist/Home/HotelPage/setting.css?rev=6f0420ddcc8614db7348010f79a4b384d">
	<link rel="stylesheet" type="text/css" href="/Public/jslib/font-awesome/4.3.0/css/font-awesome.min.css?rev=f667e6132f8470a39d2395b81ab4ef09d">
	<link rel="stylesheet" type="text/css" href="/Public/jslib/font-awesome/4.3.0/css/awesome-bootstrap-checkbox.css?rev=b4b14d9d0932e0628e81e34d78e695bfd">
	<link rel="stylesheet" type="text/css" href="/Public/dist/Home/SynPage/index.css?rev=4e057e84e123f97987851a035ff16081d">
</block>
<block name="document">
    <div id="doc" class="container-above-md">
        <include file="zh_tw:Public:Include_control_navbar" navbar-menu-setting="active" />
        <div id="doc-body" class="row">
            <include file="zh_tw:Public:Include_setting_side" doc-side-syn="active" />
            <div id="doc-center">	
                <!--内容填写-->
				<div class="content-panel">
                    <div class="content-panel-header">
                        <div class="content-panel-title">鎖掌櫃{$synName.communityName}的房間導入{$synName.hotelName}
                        </div>
                        <div class="content-panel-operation">
                            <div class="btn-raised btn-sm btn-primary" data-toggle="modal" data-target="#addModal" id="importRoomType">添加房型</div>
                        </div>
                    </div>
                    <div class="content-panel-body">
					
                            <empty name="roomDetail">
                                <div class="content-panel-empty vertical-middle-block sm-height typo-body-1">
                                    <div class="vertical-middle-block-cell">您還未同步任何房間</div>
                                </div>
                            <else />
                            <div class="content-panel-help">房型與價格導入</div>
                            
                                <table class="table content-panel-table">
                                    <thead>
                                        <tr>
                                            <th>房型名稱</th>
											<th>已同步房間號</th>
                                            <th>默認價格</th>
                                            <if condition = "$isPayUclbrt eq true or $isFreeHotel eq true">
                                                <th>義賣價格</th>
                                            </else>
                                            </if>
                                            <th>操作</th>
                                        </tr>
                                    </thead>
                                    <tbody id="roomTypeList">
										<volist name="roomDetail" id="vo">
											<tr>
												<td class="roomTypeName">{$vo.name}</td>
												<td>
													<volist name="vo.room" id="room">
														<span class="roomDeleteSpan"> {$room.name} 
															<em class="roomDeleteEm" data-value="{$room.id}" data-room="{$room.name}" data-toggle="modal" data-target="#deleteRoomModal">x</em>
														</span>
													</volist>
												</td>
                                                <td>{$vo.price}</td>
                                                <if condition = "$isPayUclbrt eq true or $isFreeHotel eq true">
                                                    <td>{$vo.charityprice}</td>
                                                </else>
                                                </if>
												<td class="col-xs-3">
													<div class="btn-link importBtn" data-value="{$vo.id}" data-toggle="modal" data-target="#importRoomModal">導入</div>
												</td>
											</tr>
										</volist>
                                    </tbody>
                                </table>
							</empty>
							<div class="content-panel-help" id="kongbaihang"></div>
                    </div>
					
                </div>
				<div class="content-panel">
                    <div class="content-panel-header">
                        <div class="content-panel-title">鎖掌櫃{$synName.communityName}的子管理員和職員導入{$synName.hotelName}
                        </div>
                        <div class="content-panel-operation">
                            <div class="btn-raised btn-sm btn-primary" data-toggle="modal" data-target="#importAdminModal">導入子賬號</div>
                        </div>
                    </div>
                    <div class="content-panel-body">
					
                            <empty name="adminSyn">
                                <div class="content-panel-empty vertical-middle-block sm-height typo-body-1">
                                    <div class="vertical-middle-block-cell">您還未同步任何管理員</div>
                                </div>
                            <else />
                            <div class="content-panel-help">子管理員與職員導入</div>
                            
                                <table class="table content-panel-table">
                                    <thead>
                                        <tr>
                                            <th class="col-xs-4">姓名</th>
                                            <th>手機號</th>
                                            <th>操作</th>
                                        </tr>
                                    </thead>
                                    <tbody>
										<volist name="adminSyn" id="vo">
										 <tr id="account{$vo.adminlogin_id}">
                                            <td class="name">
											{$vo.name}
											<empty name="vo.notdelete">
											<span style="color:red">(鎖掌櫃已刪除該管理員)</span>
											</empty>
											</td>
                                            <td class="mobile">{$vo.mobile}</td>
											<td class="col-xs-3" account="{$vo.adminlogin_id}">
												<div class="btn-link" data-toggle="modal" data-target="#deleteModal">刪除</div>
											</td>
                                        </tr>
										</volist>
										
                                    </tbody>
                                </table>
							</empty>
							<div class="content-panel-help" id="kongbaihang"></div>
                    </div>
                </div>
				<div class="syn-btn-center">
					<div class="btn-raised btn-sm btn-primary syn-btn-left"><a style="color:#fff" id="backCommunity">上壹步</a></div>
					<div class="btn-raised btn-sm btn-primary syn-btn-right"><a style="color:#fff" id="successImport">完成</a></div>
				</div>
			</div>
            <!--end of doc-center-->
        </div>
        <!--end of doc body-->
    </div>
    <!--end of doc-->
	<!--添加房型的模态框-->
    <div class="modal fade" data-backdrop="static" id="addModal">
        <div class="modal-dialog sm-width">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="btn close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                    <div class="modal-title">添加房型</div>
                </div>
                <div class="modal-body" id="importRoomTypeBody">
                    <form class="form-horizontal form-sm">
                        <div class="form-group">
                            <label class="col-xs-3 control-label">名稱:</label>
                            <div class="col-xs-5">
                                <input type="text" class="form-control" id="addName" autocomplete="off" placeholder="請輸入房型名稱" value="" />
                            </div>
                            <div class="col-xs-4">
                                <div class="help-block"></div>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-xs-3 control-label">房價:</label>
                            <div class="col-xs-5">
                                <input type="text" class="form-control" id="addPrice" autocomplete="off" placeholder="單位（{$hotelDefaultSymbol}）" value="" />
                            </div>
                            <div class="col-xs-4">
                                <div class="help-block"></div>
                            </div>
                        </div>
                        <if condition = "$isPayUclbrt eq true or $isFreeHotel eq true">
                            <div class="form-group">
                                <label class="col-xs-3 control-label">房型義賣價:</label>
                                <div class="col-xs-5">
                                    <input type="text" class="form-control" id="addCharityPrice" autocomplete="off" placeholder="單位（{$hotelDefaultSymbol}）" value="" />
                                </div>
                                <div class="col-xs-4">
                                    <div class="help-block"></div>
                                </div>
                            </div>
                        </else>
                        </if>
                    </form>
                </div>
				
                <div class="modal-footer">
                    <div class="form-horizontal form-sm">
                        <div class="form-group">
                            <div class="col-xs-10 col-xs-offset-2">
                                <div class="help-block inline-help-block inline-help-block-right" id="roomTypeRepeat"></div>
                                <button type="button" class="btn-sm btn-primary btn-raised" id="submitAdd">確定</button>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
	<!--導入房間的模态框-->
    <div class="modal fade" data-backdrop="static" id="importRoomModal">
        <div class="modal-dialog sm-width">
            <div class="modal-content">
                <div class="modal-header" id="importRoomHeader">
                    <button type="button" class="btn close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                    <div class="modal-title">導入房間</div>
                </div>
                <div class="modal-body" id="importRoomBody" style="font-size:14px;">
                    <form class="form-horizontal form-sm">	 
                        <div class="form-group">
							<volist name="roomFormat" id="vo" key="k">
							<div class="col-xs-5" style="margin-left:100px">
								<div class="checkbox checkbox-success checkbox-inline">
									<input type="checkbox" class="styled buildFloor" id="inlineCheckbox{$k}" data-value="{$k}">
									<label for="caret{$k}"></label>
								</div>
								<label class="roomDrapdown finger" id="caret{$k}">
									{$vo[0]['buildFloorName']} 
									<span class="caret finger"></span>
								</label>
							</div>
							
							<div class="col-xs-8 roomCheckbox hidden" id="roomcaret{$k}" data-value="{$k}" style="margin-left:130px;">
								<volist name="vo" id="room">
									<div class="checkbox checkbox-success checkbox-inline">
										<input type="checkbox" class="styled roomName hidden" room-no="{$room.no}" data-value="{$room.communityentity_id},{$room.builderinfo_id},{$room.floorinfo_id},{$room.id},{$room.no},{$room.locktype}" id="room{$room.id}">
										<label for="room{$room.id}"> {$room.no} </label>
									</div>
								</volist>
							</div>
							</volist>
							
                        </div>
                    </form>
                </div>
                <div class="modal-footer">
                    <div class="form-horizontal form-sm">
                        <div class="form-group">
                            <div class="col-xs-10 col-xs-offset-2">
                                <div class="help-block inline-help-block inline-help-block-right" id="roomRepeat"></div>
                                <button type="button" class="btn-sm btn-primary btn-raised" id="submitAddRoom">添加</button>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
	<!--導入子管的模态框-->
    <div class="modal fade" data-backdrop="static" id="importAdminModal">
        <div class="modal-dialog sm-width">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="btn close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                    <div class="modal-title">導入子管 <input type="checkbox" id="allAdminCheckbox" value="option1"></div>
                </div>
                <div class="modal-body">
                    <form class="form-horizontal form-sm adminCheckbox">	 
					<volist name="account" id="vo">
                        <div class="form-group">
							<div class="col-xs-12">
								<label class="checkbox-inline">
									<input type="checkbox" class="addAdminCheckbox" value="{$vo.mobile},{$vo.nickname},{$vo.masterentity_id},{$vo.usercommunity_id},{$vo.areacode}"> {$vo.nickname} +{$vo.areacode} {$vo.mobile}
								</label>
							</div>
                        </div>
					</volist>
                    </form>
                </div>
                <div class="modal-footer">
                    <div class="form-horizontal form-sm">
                        <div class="form-group">
                            <div class="col-xs-10 col-xs-offset-2">
                                <div class="help-block inline-help-block inline-help-block-right"></div>
                                <button type="button" class="btn-sm btn-primary btn-raised" id="submitAdmin">添加</button>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
	<!--刪除房間模态框-->
    <div class="modal fade" data-backdrop="static" id="deleteRoomModal">
        <div class="modal-dialog modal-confirm">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="btn close" data-dismiss="modal" aria-label="Close">
                        <span aria-hidden="true">&times;</span>
                    </button>
                    <div class="modal-title">刪除房間號</div>
                </div>
                <div class="modal-body">
                    妳確定要刪除房間號&nbsp;<span class="deleteRoomName text-accent"></span>&nbsp;嗎？
                </div>
                <div class="modal-footer">
                    <div class="form-horizontal form-sm">
                        <div class="form-group">
                            <div class="col-xs-10 col-xs-offset-2">
                                <div class="help-block inline-help-block inline-help-block-right" id="roomDeleteTip"></div>
                                <button type="button" class="btn-sm btn-primary btn-raised" id="submitRoomDelete">確定</button>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
	<!--刪除子賬號模态框-->
    <div class="modal fade" data-backdrop="static" id="deleteModal">
        <div class="modal-dialog modal-confirm">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="btn close" data-dismiss="modal" aria-label="Close">
                        <span aria-hidden="true">&times;</span>
                    </button>
                    <div class="modal-title">刪除子賬號</div>
                </div>
                <div class="modal-body">
                    妳確定要刪除子賬號&nbsp;<span class="account text-accent"></span>&nbsp;，姓名&nbsp;<span class="name text-accent"></span>&nbsp;嗎？
                </div>
                <div class="modal-footer">
                    <div class="form-horizontal form-sm">
                        <div class="form-group">
                            <div class="col-xs-10 col-xs-offset-2">
                                <div class="help-block inline-help-block inline-help-block-right"></div>
                                <button type="button" class="btn-sm btn-primary btn-raised" data-value='' id="submitDelete">確定</button>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
	
</block>
<block name="extendFootJs">
    <script type="text/javascript" src="/Public/dist/Home/common_control.js?rev=b068a314e7294938880462ae75484c50d"></script>
    <script type="text/javascript" src="/Public/dist/Home/SynPage/index.js?rev=42224509ebc9ea23d8f7cb509a7b6a2bd"></script>
	<script type="text/javascript" src="/Public/uclbrt/ulite/city/citylist.min.js?rev=eb037c4769250fbfbd6d87f2b5ba2e15d"></script>
</block>
